package com.ln.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ln.dao.IBaseDAO;
import com.ln.dao.impl.UserDAO;
import com.ln.dto.ParamsMap;
import com.ln.pojo.impl.UserPOJO;
import com.ln.service.BaseService;

@Service
@Transactional
public class UserService extends BaseService<UserPOJO, Integer> {
	@Autowired
	private UserDAO userDAO;

	@Override
	protected IBaseDAO<UserPOJO, Integer> getDao() {
		return userDAO;
	}
	
	public UserPOJO login(final UserPOJO pojo) {
		return userDAO.login(pojo);
	}
	
	public int isExistEmail(final String email) {
		return userDAO.isExistEmail(email);
	}
	
	public int updatePassword(ParamsMap paramsMap) {
		return userDAO.updatePassword(paramsMap);
	}
	
	public String selectPassword(final int user_id) {
		return userDAO.selectPassword(user_id);
	}

}
